<?php
header("content-type:text/html;charset=utf-8");
$lifetime=10;
session_set_cookie_params($lifetime);
session_start();
if($_SESSION['dpwd'] != 'dpwd'){
	$zm='lyesswlqbj';
	$arr=array(37575451,37575451,195956535,91515457,735356595,37575859,91515253,195958575,735352515,37575451);
	$now=date('Y-m-d H:i:s');
	$i=substr($now, -5,1);
	$j=substr($now, -4,1);
	$mm=$zm{$i}.$zm{$j}.$arr[$j];
	echo $now."<br>";
	echo "分钟的二位八码公式"."<br>";
	echo mt_rand(100000,999999);
	
	if($_POST['dpwd']&&$_POST['dpwd']==$mm){
		$_SESSION['dpwd'] = 'dpwd';
		echo "<script>"; 
		echo "alert('对了 ~_~！');";
		echo "window.location.href='pwd.php';";
		echo "</script>";
	}elseif($_POST['dpwd']&&($_POST['dpwd']!=$mm)){
		echo "<script>";
		echo "alert('错啦 -_-！');";
		echo "window.location.href='#';";
		echo "</script>";
	}

	echo "<form action='#' method='post'>
			<input type='text' name='dpwd' value='' />
			<input type='submit' value='提交'/>
		</form>";
	exit();
}

echo '对了';


?>